package com.dick.base.security.dto;

import com.dick.base.util.ValidateMessageCodes;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;

@Data
public class AuthorityModifyParameter {

    @NotEmpty(message = ValidateMessageCodes.AUTHORITY_ID_NOT_EMPTY)
    private Integer id;

    @Size(min = 1, max = 32, message = ValidateMessageCodes.AUTHORITY_NAME_SIZE)
    @NotEmpty(message = ValidateMessageCodes.AUTHORITY_NAME_NOT_EMPTY)
    private String name;

    @Min(value = 0, message = ValidateMessageCodes.AUTHORITY_AUTHORITY_TYPE_RANGE)
    @Max(value = 2, message = ValidateMessageCodes.AUTHORITY_AUTHORITY_TYPE_RANGE)
    private Byte authorityType;

    @Size(min = 1, max = 32, message = ValidateMessageCodes.AUTHORITY_AUTHORITY_CODE_SIZE)
    @NotEmpty(message = ValidateMessageCodes.AUTHORITY_AUTHORITY_CODE_NOT_EMPTY)
    private String authorityCode;
}
